Exhausting Internal Storage

TEX keeps track of a number of internal variables and will cease processing a file should the allocated maximum usage be exceeded. When is being used extensively the most common TEX capacity exceeded messages will be:


Save-Stack: Likely cause is that variables were passed both locally and globally between subroutines too many times. Check that global precedes all assignment statements, arithmetic operations (except negate ) and so forth. In the above LIS file example 280 out of 600 S-stack (save stack) positions were used.


P-Stack: Your macro definitions have exceeded the maximum total number of arguments permitted. This, and the above error, could be caused by a recursive definition gone awry. In the above example 53 out of 60 P-Stack positions were used.


! No room for a new count.: You have defined too many numerical counters via the newcount or newcounter command. Between them TEX, LATEX, and , may use up to 218 out of 234 available counters. Try to re-use old variables, the Xone...Yeight available for the user or use some dimen counters where possible. Typically the last few lines in your LIS file will look like:

\OOO=\count234

! No room for a new \count .
\ch@ck ...\else \errmessage {No room for a new #3}
                                                  \fi 
\alloc@ ...\advance \count 1#1by\@ne \ch@ck #1#4#2
                                                  \allocationnumber =\count ...
l.36 \newcount\PPP
followed by a synopsis of TEX's memory usage.


Multi-letter Control Sequences: Probably too many macro def's defined. Many such errors will occur if you attempt to input more than once.